package com.ruoyi.price.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruoyi.system.domain.SysFile;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * 工程信息对象 tb_project
 * 
 * @author ruoyi
 * @date 2022-09-04
 */
@TableName("tb_project")
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class TbProject extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    @TableId
    @TableField("`id`")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    /** 名称 */
    @Excel(name = "名称")
    @TableField("`name`")
    @NotBlank(message = "名称不能为空")
    @Size(max=32,message = "名称最大长度32个字符")
    private String name;

    /** 国别 */
    @Excel(name = "国别",dictType = "country_list")
    @TableField("`country_type`")
    @NotBlank(message = "国别不能为空")
    @Size(max=10,message = "国别最大长度10个字符")
    private String countryType;

    /** 编码 */
    @Excel(name = "编码")
    @TableField("`code`")
    private String code;

    /** 工程开始日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "工程开始日期", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("`project_start_date`")
    @NotNull(message = "工程开始日期不能为空")
    private Date projectStartDate;

    /** 工程结束日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "工程结束日期", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("`project_end_date`")
    @NotNull(message = "工程结束日期不能为空")
    private Date projectEndDate;

    /** 中国工人工日单价 */
    @Excel(name = "中国工人工日单价")
    @TableField("`chinese_worker_unit_price`")
    @NotNull(message = "中国工人工日单价不能为空")
    private BigDecimal chineseWorkerUnitPrice;

    /** 中国工人工日单价货币类型 */
    @Excel(name = "中国工人工日单价货币类型")
    @NotBlank(message = "中国工人工日单价货币类型不能为空")
    @TableField("`chinese_worker_unit_price_type`")
    private String chineseWorkerUnitPriceType;


    /** 外国工人工日单价 */
    @Excel(name = "外国工人工日单价")
    @TableField("`foreign_worker_unit_price`")
    @NotNull(message = "外国工人工日单价不能为空")
    private BigDecimal foreignWorkerUnitPrice;

    /** 外国工人工日单价货币类型 */
    @Excel(name = "外国工人工日单价货币类型")
    @NotBlank(message = "外国工人工日单价货币类型不能为空")
    @TableField("`foreign_worker_unit_price_type`")
    private String foreignWorkerUnitPriceType;

    /** 中外用工比 */
    @Excel(name = "中外用工比")
    // @TableField("`labor_ratio`")
    // @NotBlank(message = "中外用工比不能为空")
     private String laborRatio;

    /** 定额工日单价 */
    @Excel(name = "定额工日单价")
    @TableField("`fixed_unit_price`")
    @NotNull(message = "定额工日单价不能为空")
    private BigDecimal fixedUnitPrice;

    /** 实际工日单价 */
    @Excel(name = "实际工日单价")
    @TableField("`actual_unit_price`")
    @NotNull(message = "实际工日单价不能为空")
    private BigDecimal actualUnitPrice;

    /** 中外工效比 */
    @Excel(name = "中外工效比")
    @TableField("`efficiency_ratio`")
    // @NotBlank(message = "中外工效比不能为空")
     private String efficiencyRatio;

    /** 文件id(多个逗号分隔) */
    @Excel(name = "文件id(多个逗号分隔)")
    @TableField("`file_ids`")
    private String fileIds;

    /** 结算货币类型 */
    @Excel(name = "结算货币类型")
    @TableField("`settle_currency_type`")
    private String settleCurrencyType;

    /** 计算结果 */
    @Excel(name = "计算结果")
    @TableField("`result`")
    private String result;

    @TableField(exist = false)
    private List<SysFile> files;

    @TableField(exist = false)
    private String fileJson;

    /** 工程日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "工程结束日期", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField(exist = false)
    private String projectDate;

    @TableField(exist = false)
    private Integer type;

    @TableField(exist = false)
    private String beginTime;

    @TableField(exist = false)
    private String endTime;

    private String status;

    /** 中外用工比 */
    @NotBlank(message = "中外用工比分子不能为空")
    private String laborRatioStart;

    /** 中外用工比 */
    @NotBlank(message = "中外用工比分母不能为空")
    private String laborRatioEnd;

    @NotBlank(message = "中外工效比分子不能为空")
    private String efficiencyRatioStart;

    /** 中外工效比 */
    @NotBlank(message = "中外工效比分母不能为空")
    private String efficiencyRatioEnd;

    @TableField(exist = false)
    private String currencyType;

    private BigDecimal chineseExchangeRateAmount;

    private BigDecimal foreignExchangeRateAmount;
}
